*****************************************************************************************************************************************************
* PROJECT: 		Exposure to the COVID-19 Stock Market Crash and its Effect on Household Expectations
* DATE: 		Nov 2020
* CONTENT: 		FIGURES
* AUTHORS: 		Tobin Hanspal, Johannes Wohlfart, Anni Weber
*****************************************************************************************************************************************************

		clear all
		set scheme lean2
		global pm = char(177)
		set more off
		gl date = c(current_date)
		graph set window fontface "cmr10"
		
		
* set cd as /Replication_files_HanspalWeberWohlfart2020/

*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~						
** FIGURE A8
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~	

use data/processed/data_1, clear 
keep if control_pure ==1

foreach x in expec_morehrs expec_retirlater expec_debthigher {
	replace `x' = `x'*100
}
			
* Change in expected labormarket activity across groups		
				
	* expected work more hurs  by netwealth
	graph bar (mean)  expec_morehrs  , ///
			over(netwealth_Jan20_grp, relabel(1 1 2 2 3 3 4 4 5 5)) b1title() ///
			bargap(0) exclude0 /// 
			ytitle("Increase expected desired working hours (%)", size(medsmall)) ///
			graphregion(color(white)) bgcolor(white) ///
			ylabel(0(10)60, nogrid)  legend(size(small) pos(6) ring(1) cols(6) ///
			label(1 "Other financial wealth") label(2 "Retirement wealth") ///
			label(3 "Total financial wealth")) saving(Figures/temp7.gph, replace)	
		
	* expected work more hours  by age
	graph bar (mean)  expec_morehrs  , ///
			over(agecat, relabel(1 "18-24" 2 "25-34" 3 "35-44" 4 "45-54" 5 "55-64" 6 "65+") label(labsize(small))) b1title() ///
			bargap(0) exclude0 /// 
			ytitle("", size(medsmall)) ///
			graphregion(color(white)) bgcolor(white) ///
			ylabel(0(10)60, nogrid)  legend(size(small) pos(6) ring(1) cols(6) ///
			label(1 "Other financial wealth") label(2 "Retirement wealth") ///
			label(3 "Total financial wealth")) saving(Figures/temp8.gph, replace)	
		
	* expected work more hours  by netincome
	graph bar (mean)  expec_morehrs  , ///
			over(hhnetinc_2019_grp) b1title() ///
			bargap(0) exclude0  /// 
			ytitle("", size(medsmall)) ///
			graphregion(color(white)) bgcolor(white) ///
			ylabel(0(10)60, nogrid)  legend(size(small) pos(6) ring(1) cols(6) ///
			label(1 "Other financial wealth") label(2 "Retirement wealth") ///
			label(3 "Total financial wealth")) saving(Figures/temp9.gph, replace)	
			
	* expected retire later  by netwealth
	graph bar (mean)  expec_retirlater  , ///
			over(netwealth_Jan20_grp, relabel(1 1 2 2 3 3 4 4 5 5)) b1title(Net wealth quintile, size(medsmall)) ///
			bargap(0) exclude0 /// 
			ytitle("Increase expected retirement age (%)", size(medsmall)) ///
			graphregion(color(white)) bgcolor(white) ///
			ylabel(0(10)60, nogrid)  legend(size(small) pos(6) ring(1) cols(6) ///
			label(1 "Other financial wealth") label(2 "Retirement wealth") ///
			label(3 "Total financial wealth")) saving(Figures/temp10.gph, replace)	
			
	* expectedretire later  by age
	graph bar (mean)  expec_retirlater  , ///
			over(agecat, relabel(1 "18-24" 2 "25-34" 3 "35-44" 4 "45-54" 5 "55-64" 6 "65+") label(labsize(small))) b1title(Age group, size(medsmall)) ///
			bargap(0) exclude0  /// 
			ytitle("", size(medsmall)) ///
			graphregion(color(white)) bgcolor(white) ///
			ylabel(0(10)60, nogrid)  legend(size(small) pos(6) ring(1) cols(6) ///
			label(1 "Other financial wealth") label(2 "Retirement wealth") ///
			label(3 "Total financial wealth")) saving(Figures/temp11.gph, replace)	
	* expected retire later by netincome
			
	graph bar (mean)  expec_retirlater  , ///
			over(hhnetinc_2019_grp) b1title(Net income quintile, size(medsmall)) ///
			bargap(0) exclude0 /// 
			ytitle("", size(medsmall)) ///
			graphregion(color(white)) bgcolor(white) ///
			ylabel(0(10)60, nogrid)  legend(size(small) pos(6) ring(1) cols(6) ///
			label(1 "Other financial wealth") label(2 "Retirement wealth") ///
			label(3 "Total financial wealth")) saving(Figures/temp12.gph, replace)	
				
	graph combine Figures/temp7.gph ///
				  Figures/temp9.gph ///
				  Figures/temp8.gph ///
				  Figures/temp10.gph ///
				  Figures/temp12.gph ///
				  Figures/temp11.gph,  ysize(2) xsize(3) rows(2)  
				  
	graph export Figures/FigureA8.pdf, as(pdf) fontface("cmr10") replace
	graph export Figures/FigureA8.png, width(1600) replace	
				

forvalues x = 7/12 {
		capture erase Figures/temp`x'.gph
}	
	
